#include "HiranipraShared.h"

#include "Net/NetBase.h"

#ifndef _SHARED_NET_NETSERVER_H_
#define _SHARED_NET_NETSERVER_H_

namespace Hiranipra {
	namespace Net {

		class NetServer : implements NetBase
		{
		public:
			NetServer();
			virtual ~NetServer();

			bool Listen( const Address& address, size_t peerCount );

			bool Broadcast( uint8 channelId, Packet* packet );

		protected:
			virtual void OnConnect( ENetEvent& ev );
			virtual void OnDisconnect( ENetEvent& ev );

		private:
			Address		_boundAddress;
		};

	}
}

#endif // _SHARED_NET_NETSERVER_H_
